import Vue from 'vue'
import App from './App'
import router from './router'

Vue.config.productionTip = false

//导入mint-ui
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI)//把mint-ui所有css组件注册为全局组件,js组件每次使用都需要单独导入

//npm没有mui,从github下载
import '@/assets/css/mui/css/mui.min.css'
import './assets/css/mui/css/icons-extra.css'
import './assets/css/mui/fonts/mui-icons-extra.ttf'

import moment from 'moment'
Vue.filter('dateFormat', function(ori, rules = "YYYY-MM-DD HH:mm:ss") {
  // let year = ori.getFullYear();
  // let month = ori.getMonth() + 1;
  // let day = ori.getDate();
  // let hour = ori.getHours();
  // let minute = ori.getMinutes();
  // let second = ori.getSeconds();
  // let currenttime = `${year}-${month}-${day} ${hour}:${minute}:${second}`;
  // return currenttime;
  return moment(ori).format(rules)
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  render: h => h(App)
})
